<article class="module width_full">
    <header><h3>{#petitions#}</h3></header>
        <div class="module_content">
            <div class="content">
                <fieldset>
                    <label>{#actually_petitions#}</label>
					<table cellpadding="2" style="width:100%; margin:5px;" cellspacing="2" border="0">
						<tbody>
                                                     {if !empty($value)}
							{foreach from=$value item=item}
							<tr>
								<td class="body">&raquo; <a href="index.php?mod=petitions&page=detail&id={$item.id}"><b>{$item.status} | {$item.title}</b></a></td>
							</tr>
							{/foreach}
                                                     {/if}
						</tbody>
					</table>
                </fieldset>
              <fieldset>
                    <label>{#old_petitions#}</label><div style="clear:both;"></div>
					<div id="tablewrapper">
						<div id="tableheader">
							<div class="search">
								<select id="columns" onchange="sorter.search('query')">
									<option value="-1">{#columns#}</option>
								</select>
								<input type="text" id="query" onkeyup="sorter.search('query')" />
							</div>
							<span class="details">
								<div>{#entries#} <span id="startrecord"></span>-<span id="endrecord"></span> {#from#} <span id="totalrecords"></span></div>
								<div><a href="javascript:sorter.reset()">{#reset#}</a></div>
							</span>
						</div>
						<table cellpadding="0" cellspacing="0" id="table" class="tinytable" style="width:100%;" >
							<thead>
								<tr>
									<th><h3>{#title#}</h3></th> 
									<th><h3>{#status#}</h3></th>
								</tr>
							</thead>
							<tbody>
								{if !empty($old_value)}
								{foreach from=$old_value item=item}
								<tr>
									<td><a href="index.php?mod=petitions&page=detail&id={$item.id}"><b>{$item.title}</b></a></td>
									<td>{$item.status}</td>
								</tr>
								{/foreach}
								{else}
								<tr>
									<td colspan="3">{#nologs#}</td>
								</tr>
								{/if}
							</tbody>
						</table>
						<div id="tablefooter">
							<div id="tablenav">
								<div>
								  <!--<img src="_images/icons/arrow_left.png" alt="First Page" onclick="sorter.move(-1,true)" />&laquo;-->
									<img src="_images/icons/arrow_left.png" alt="First Page" onclick="sorter.move(-1)" />
									<img src="_images/icons/arrow_right.png" alt="First Page" onclick="sorter.move(1)" />
									<!--<img src="_images/icons/arrow_right.png" alt="Last Page" onclick="sorter.move(1,true)" />&raquo;-->
								</div>
								<div>
									<select id="pagedropdown"></select>
								</div>
								<div class="page">
									<a href="javascript:sorter.showall()">{#see_all#}</a>
								</div>
							</div>
							<div id="tablelocation">
								<div>
									<select onchange="sorter.size(this.value)">
										<option value="5">5</option>
										<option value="10" selected="selected">10</option>
										<option value="20">20</option>
										<option value="50">50</option>
										<option value="100">100</option>
									</select>
									<span>{#entries_p_site#}</span>
								</div>
								<div class="page">{#site#} <span id="currentpage"></span> {#from#} <span id="totalpages"></span></div>
							</div>
						</div>
					</div>
                </fieldset>
			</div>
        </div>
</article>
{literal}
<script>



    var sorter = new TINY.table.sorter('sorter','table',{
      headclass:'head',
      ascclass:'asc',
      descclass:'desc',
      evenclass:'evenrow',
      oddclass:'oddrow',
      evenselclass:'evenselected',
      oddselclass:'oddselected',
      paginate:true,
      size:10,
      colddid:'columns',
      currentid:'currentpage',
      totalid:'totalpages',
      startingrecid:'startrecord',
      endingrecid:'endrecord',
      totalrecid:'totalrecords',
      hoverid:'selectedrow',
      pageddid:'pagedropdown',
      navid:'tablenav',
      sortcolumn:1,
      sortdir:1,
      init:true
    });
    </script>
    {/literal}